<?php

namespace App\Http\Controllers\Client;

use App\Http\Controllers\Controller;
use App\Models\Feedback;
use Illuminate\Http\Request;

class FeedbackController extends Controller
{

    protected $feedbackModel;

    public function __construct()
    {
        $this->feedbackModel = new Feedback();

    }

    public function submitFeedback(Request $request){
        $type = $request->input('type');
        $comment = $request->input('comment');
        $openid = $request->input('openid');
        $data = [
          'type'=> $type,
          'comment' => $comment,
          'openid' => $openid
        ];
        $this->feedbackModel->saveNewData($data);
        return $this->success($data,"提交反馈成功");

    }
}
